﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Business.Entities;
using Business.Logic;
using System.Diagnostics;

namespace Business
{
    public class Context
    {
        //public static Config Config;

        static Context()
        {
            System.Reflection.Assembly a = System.Reflection.Assembly.GetExecutingAssembly();
            ConfigPath = System.IO.Path.GetDirectoryName(a.GetName().CodeBase).Replace("file:\\", "");
            AppPath = ConfigPath;
        }

        public static string GetAssemblyVersion()
        {
            try
            {

                return System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
            }
            catch (Exception)
            {
                return ("x.y.z");
            }
        }

        /// <summary>
        /// Injected json api
        /// </summary>
        public static IJsonApi JsonApi;

        public static String ConfigPath;// @"D:\coding\source\dotnet\WinMo\GogTasks";
        public static String AppPath;// @"D:\coding\source\dotnet\WinMo\GogTasks";


        public static String AppName = "GogTasks";

    }
}
